//判断当前域名是http还是https,并读取当前域名
var getBaseUrl = function () {
    var ishttps = 'https:' == document.location.protocol ? true: false;
    var url     = window.location.host;
    if(ishttps){
        url = 'https://' + url;
    }else{
        url = 'http://' + url;
    }
    return url;
}

//常用函数封装
function openWin(url,win = "Bar",ishost = 1){
    var url = ishost == 1 ? url : getBaseUrl()+url;
    if(typeof jsObj === 'undefined'){
        location.href = url;
    }else{
        jsObj.gotoActivity(win,url,true)
    }
}

